package xyz.ymtao.config;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.core.metrics.jfr.FlightRecorderApplicationStartup;

/**
 * @author: ymt
 * @description:
 * @date: 2021/8/18  10:48
 */
@Configuration
public class BeanConfig {

    @Bean
    public MessageSource messageSource(){
        ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
        messageSource.setBasenames("format","exceptions","windows");
        messageSource.setDefaultEncoding("UTF-8");
        return messageSource;
    }

}
